/*
    This Library contains all the default include files, functions, and global variables used in my projects
*/
#ifndef BJ
#define BJ
#pragma warning(disable : 4996)

#include <time.h>
#include <iostream>
#include <windows.h>
#include <vector>
#include <list>
#include <cmath>
#include <string>

using namespace std;

extern double BJ_gD;
extern double BJ_gR;
extern double BJ_gX;
extern double BJ_gY;
extern double BJ_gZ;
/*
    The Point class stores an ordered Pair (x,y) for a location, and functions to manipulate said point.
*/
class Point
{
    public:
        Point
        (
            void
        )
        {
            _x = 0;
            _y = 0;
        }
        ~Point
        (
            void
        )
        {
        
        }
        
        double x(void)
        {
            return _x;
        }
        
        void set
        (
            double x,
            double y
        )
        {
            _x = x;
            _y = y;
        }
        
        double y(void)
        {
            return _y;
        }
        
        void polar_offset
        (
            double mag,
            double angle
        )
        {
            _x += mag*cos(angle);
            _y += mag*sin(angle);
        }
        
        double distance_sqr
        (
            Point *other
        )
        {
            double dx = _x-other->_x;
            double dy = _y-other->_y;
            return ((dx*dx)+(dy*dy));
        }
        
        bool in_bounds
        (
            double x1,
            double x2,
            double y1,
            double y2,
            double radius
        )
        {
            return ((x1 < _x+radius) && (x2 > _x-radius) && (y1 < _y+radius) && (y2 > _y-radius));
        }
        
    private:
        double _x;
        double _y;
};

extern Point *BJ_gTempLoc;

void BJ_init // Calls any functions that need to be called on startup, must be called in main for the related functions to work.
(
);

double BJ_rand
(
    double low,
    double high
);

double BJ_min
(
    double first,
    double second
);

double BJ_max
(
    double first,
    double second
);

#endif